/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cms.action;

import com.opensymphony.xwork2.ActionSupport;
import dto.Conference;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Gary
 */
public class MemberAction  extends ActionSupport{
    
    private List<Conference> availableConferences;

    public List<Conference> getAvailableConferences() {
        return availableConferences;
    }

    public void setAvailableConferences(List<Conference> availableConferences) {
        this.availableConferences = availableConferences;
    }

    public List<Conference> getMyConferences() {
        return myConferences;
    }

    public void setMyConferences(List<Conference> myConferences) {
        this.myConferences = myConferences;
    }
    private List<Conference> myConferences;
    
    public MemberAction() {
    }
    
    public String list()
    {
         availableConferences = new ArrayList<Conference>();
         for(int i = 0; i < 10; i++){
            Conference dc = new Conference("Conference" + i, "Siminar", "Sands Hotel", true, null, true, 99.90 + i*100, 128);
            boolean add = availableConferences.add(dc);
         }
          myConferences = new ArrayList<Conference>();
         for(int i = 0; i < 5; i++){
            Conference dc = new Conference("MyConference" + i, "Siminar", "Sands Hotel", true, null, true, 99.90 + i*100, 128);
            boolean add = myConferences.add(dc);
         }
        return "conferencelist";
    }
}
